{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}
 <div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>名片设置</strong></li>
		<li>http://auth.cn/web/busi_card/index.html</li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">
				<input type="hidden" name="id" value="{$ad.id}" />
					<div class="form-group">
						<label class="col-sm-3 control-label">名称：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="relname" name="relname" value="{$ad.relname}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">职务：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="post" name="post" value="{$ad.post}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">个人简介：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="info" name="info" value="{$ad.info}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">移动电话：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="servicephone" name="servicephone" value="{$ad.servicephone}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">座机：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="phone" name="phone" value="{$ad.phone}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">QQ：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="qqnum" name="qqnum" value="{$ad.qqnum}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">微信：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="wechatnum" name="wechatnum" value="{$ad.wechatnum}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">邮箱：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="email" name="email" value="{$ad.email}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">网址：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="url" name="url" value="{$ad.url}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">店铺名称：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="name" name="name" value="{$ad.name}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">店铺地址：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="address" name="address" value="{$ad.address}"  class="form-control" />
						</div>
					</div>				
					<div class="form-group">
						<label class="col-sm-3 control-label">顶部背景：</label>
						<div class="input-group col-sm-4">
							<input type="hidden" id="bglogo" name="bglogo"  value="{$ad.bglogo}"/>
							<input id="upload" name="upload" type="file" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">店铺LOGO：</label>
						<div class="input-group col-sm-4">
							<input type="hidden" id="thumb" name="thumb"  value="{$ad.thumb}"/>
							<input id="upload" name="upload" type="file" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">营业范围：</label>
						<div class="input-group col-sm-4">
							<select class="form-control" name="store_property">
								{volist name="trd_list" id="vo"}
										<option value="{$vo.id}" >{$vo.title}</option>
								{/volist}
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">正文：</label>
						<div class="input-group col-sm-6">
							<textarea id="content" name="content" style="height: 400px;">									
							</textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">是否开启：</label>
						<div class="input-group col-sm-4">
							<label class="checkbox-inline h5">
                                <input type="radio" name="status" value="1" {if condition="$ad.status==1"} checked{/if}> 正常
							</label>
							<label class="checkbox-inline h5">
                                <input type="radio" name="status" value="0" {if condition="$ad.status==0"} checked{/if}> 失效
							</label>
						</div>	
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">名片二维码：</label>
						<div class="input-group col-sm-4">
							<img src="{$code_url}" width="140px"/>
							<input type="text" name="" class="form-control" value="{$url}" readonly/>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script src="__LIB__/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__LIB__/ueditor/ueditor.all.js" type="text/javascript"></script>
<script>
	//编辑器
	var ueditor = UE.getEditor('content');
	upload_one('{$ad.thumb}');
	$(function() {
		$("#myForm").validate({
			rules: {
				
				relname:"required",
				servicephone: "required",
				address: "required"
			},
			messages: {
			
				relname:ICON.error + "请输入姓名",
				servicephone:ICON.error + "请输入手机号码",
				address:ICON.error + "请输入店铺地址"
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}